namespace ETestIT.Tests.DataAccess
{
    using System;
    using System.Transactions;

    public static class InTransactionExtension
    {
        public static void ExecuteThisCodeTransactionally(this object obj, Action dbUnitOfWork)
        {
            using(var transactionScope = new TransactionScope())
            {
                dbUnitOfWork();
            }
        }
    }
}